from apis.base_api import BaseApi


class Cart(BaseApi):

    def add(self, goods_id, products_id):
        url = "wx/cart/add"
        parm = {
            'goodsId': goods_id,
            'number': 1,
            'productId': products_id
        }
        # r = requests.post(url, json=parm, headers={"x-litemall-token": self.wx_token})
        r = self.send("post", url, json=parm)
        return r
